package com.common.platform.base.log;

import lombok.Getter;

/**
 * 业务日志类型
 */
@Getter
public enum BizLogType {

    ALL(0, null),//全部日志
    BUSSINESS(1, "业务日志"),
    EXCEPTION(2, "异常日志");

    Integer val;
    String message;

    BizLogType(Integer val, String message) {
        this.val = val;
        this.message = message;
    }

    public static String valueOf(Integer val) {
        if (val == null) {
            return "";
        } else {
            for (BizLogType s : BizLogType.values()) {
                if (val.equals(s.getVal())) {
                    return s.getMessage();
                }
            }
        }
        return "";
    }
}
